package cz.muni.pa036.hockeyStats;

/***********************************************************************
 * Module:  Person.java
 * Author:  Rojko
 * Purpose: Defines the Class Person
 ***********************************************************************/

import java.util.*;

/** @pdOid eeb653e5-0b00-4b00-86a6-dd453631277f */
public class Person {
   /** @pdOid 0b1f663f-29e3-413c-8160-e3fadd97d740 */
   public int idPerson;
   /** @pdOid 1f6c7574-33e8-4cfa-a1bb-494436370d2c */
   public java.lang.String firstName;
   /** @pdOid 49ba3693-69ed-4534-a6f3-6f5bffe17d61 */
   public java.lang.String lastName;
   /** @pdOid dfcdb4f4-adc6-40d8-8d1e-9197563a5504 */
   public java.awt.Image photo;
   /** @pdOid d4958f54-be97-4fb9-aa0e-142f998190a7 */
   public java.util.Date birthday;
   
   /** @pdRoleInfo migr=no name=GameOfficials assc=relationship20 coll=java.util.Collection impl=java.util.HashSet mult=1..* type=Composition */
   public java.util.Collection<GameOfficials> gameOfficials;
   
   
   /** @pdGenerated default getter */
   public java.util.Collection<GameOfficials> getGameOfficials() {
      if (gameOfficials == null)
         gameOfficials = new java.util.HashSet<GameOfficials>();
      return gameOfficials;
   }
   
   /** @pdGenerated default iterator getter */
   public java.util.Iterator getIteratorGameOfficials() {
      if (gameOfficials == null)
         gameOfficials = new java.util.HashSet<GameOfficials>();
      return gameOfficials.iterator();
   }
   
   /** @pdGenerated default setter
     * @param newGameOfficials */
   public void setGameOfficials(java.util.Collection<GameOfficials> newGameOfficials) {
      removeAllGameOfficials();
      for (java.util.Iterator iter = newGameOfficials.iterator(); iter.hasNext();)
         addGameOfficials((GameOfficials)iter.next());
   }
   
   /** @pdGenerated default add
     * @param newGameOfficials */
   public void addGameOfficials(GameOfficials newGameOfficials) {
      if (newGameOfficials == null)
         return;
      if (this.gameOfficials == null)
         this.gameOfficials = new java.util.HashSet<GameOfficials>();
      if (!this.gameOfficials.contains(newGameOfficials))
         this.gameOfficials.add(newGameOfficials);
   }
   
   /** @pdGenerated default remove
     * @param oldGameOfficials */
   public void removeGameOfficials(GameOfficials oldGameOfficials) {
      if (oldGameOfficials == null)
         return;
      if (this.gameOfficials != null)
         if (this.gameOfficials.contains(oldGameOfficials))
            this.gameOfficials.remove(oldGameOfficials);
   }
   
   /** @pdGenerated default removeAll */
   public void removeAllGameOfficials() {
      if (gameOfficials != null)
         gameOfficials.clear();
   }

}